package com.king.modules.monitor.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.king.framework.base.domain.vo.AjaxResult;
import com.king.modules.monitor.domain.vo.Server;

/**
 * 服务器监控
 * 
 * @author king
 */
@RestController
@RequestMapping("/monitor/server")
public class ServerController {
	
	@PreAuthorize("@sps.hasAuthority('monitor:server:query')")
	@GetMapping()
	public AjaxResult getInfo() throws Exception {
		Server server = new Server();
		server.copyTo();
		return AjaxResult.success(server);
	}
}
